package com.blog.blog.mapper;

import org.apache.ibatis.annotations.Param;

public interface OperationLogMapper {
    int insertLog(
            @Param("userId") Long userId,
            @Param("username") String username,
            @Param("operation") String operation,
            @Param("method") String method,
            @Param("params") String params,
            @Param("ip") String ip,
            @Param("userAgent") String userAgent,
            @Param("status") Integer status,
            @Param("errorMsg") String errorMsg,
            @Param("executeTime") Long executeTime);

    java.util.List<com.blog.blog.vo.OperationLogVO> pageLogs(@Param("q") String q,
                                                             @Param("status") Integer status,
                                                             @Param("offset") Integer offset,
                                                             @Param("limit") Integer limit);

    long countLogs(@Param("q") String q, @Param("status") Integer status);
}


